package team.headnurse.nursemanagement.serializable;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author Eugene-Forest
 */
public class ExpectationPk implements Serializable {

    private String staffId;
    private int priority;

    public ExpectationPk() {
    }

    public ExpectationPk(String staffId, int priority) {
        this.staffId = staffId;
        this.priority = priority;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ExpectationPk that = (ExpectationPk) o;
        return priority == that.priority && Objects.equals(staffId, that.staffId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(staffId, priority);
    }

    public String getStaffId() {
        return staffId;
    }

    public void setStaffId(String staffId) {
        this.staffId = staffId;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }
}
